home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / mac / Endocrinology Folder / Data / Init.dir / 00003_Script_3 < prev    next >
Text File  |  1995-11-09  |  3KB  |  121 lines

  1. -- Handler to start off. "WhereAmI" is called to detect
  2. -- which platform the movies are on. Then the movie jumps to
  3. -- the top level movie.
  4.  
  5. on startItRolling 
  6.   global gSep, CDDrive, installedFolderPath, pirateWindow
  7.   
  8.   whereAmI
  9.   checkMonitor
  10.   determineCDDrive
  11.   canISave
  12.   set the exitLock to TRUE
  13.   
  14.   put the pathName into installedFolderPath
  15.   put the pathName & "Pirate.dir" into pirateWindow
  16.   
  17.   go movie CDDrive & "00000000" & gSep & "Intro.dir"
  18.   
  19. end startItRolling
  20. ------------------------------------------
  21.  
  22. on determineCDDrive
  23.   
  24.   global CDDrive
  25.   
  26.   if the machineType <> 256 then
  27.     set CDDrive = "Endocrinology:"
  28.   else
  29.     -- put routine for scanning/selecting PC CD Drive here
  30.     Checkpaths -- see handler below
  31.   end if
  32.   
  33. end determineCDDrive
  34. ------------------------------------------
  35. on checkMonitor
  36.   global oldMonitorSetting
  37.   
  38.   if the machineType <> 256 then
  39.     put the colorDepth into oldMonitorSetting
  40.     set the colorDepth to 8
  41.     if the colorDepth <> 8 then
  42.       alert "Unable to set your monitor to 256 colours. ¼
  43. Please set your monitor to 256 colours¼
  44.  in the monitors control panel and relaunch. ¼
  45. You may continue but things will look strange."
  46.     end if
  47.   else
  48.     if the colorDepth <> 8 then
  49.       alert "Please set your monitor to 256 colours.¼
  50.  You may continue but things will look strange."
  51.     end if
  52.   end if
  53.   
  54. end checkMonitor
  55. ------------------------------------------
  56. on Checkpaths
  57.   
  58.   global CDDrive
  59.   --This handler searches through all the possible drive letters on a user's
  60.   --PC to find the CD-ROM drive letter (which isn't always "D").
  61.   --This handler assumes that:
  62.   ---->Your CD-ROM disc is already in the CD drive.
  63.   --   (if not it prompts the user to insert the disc)
  64.   ---->your CD-ROM disc contains a file called "dummy.txt" in the root
  65.   --   directory of your disc
  66.   --   (If you use a different dummy file name and directory path, make sure
  67.   --   to update the var thisPath below).
  68.   ---->You use your own filename and path in the "go to frame" line below.
  69.   ---->You have the fileIO.DLL file in the same folder as your DFW file or
  70.   ---  projector.
  71.   
  72.   
  73.   --openXlib "Fileio.dll"
  74.   --set the itemdelimiter to "\"
  75.   repeat with i = 67 to 90
  76.     set drive = numToChar(i)
  77.     set thisPath = drive & ":\PLUMINI.TXT"
  78.     set myFile = fileIO(mNew,"read",thisPath)
  79.     if objectP(myFile) then
  80.       set userCDDrive = drive
  81.       set the SearchPath =  [userCDDrive & ":\"]
  82.       set CDDrive = userCDDrive & ":\"
  83.       exit
  84.       --closeXlib "Fileio.dll"
  85.     end if
  86.   end repeat
  87.   --closeXlib "Fileio.dll"
  88.   alert "Please check that the disc is in your CD drive."
  89.   updatestage
  90.   
  91. end Checkpaths
  92. --------------------------------------------------------------------
  93. -- Check to see if Roddy is running this from the CD or the HD
  94. -- like he's supposed to!
  95.  
  96. on canISave
  97.   
  98.   put fileIO(mNew, "write", the pathName & "Wibble.TXT") into testObj
  99.   
  100.   if objectP(testObj) then
  101.     -- I'm on a HD
  102.     
  103.     testObj(mDelete)
  104.     return TRUE
  105.     
  106.   else
  107.     -- I'm on a CD
  108.     
  109.     alert "Could not create a temporary file on your Hard Disk. ¼
  110. If you are running Endocrinology directly from the CD you will not ¼
  111. be able to save slideboxes and bookmarks. Please install Endocrinology¼
  112.  if you wish to use those features."
  113.     
  114.     return FALSE
  115.     
  116.   end if
  117.   
  118. end canISave 
  119.  
  120.  
  121.